#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>

int main(int argc, char* argv[])
{
    if(argc != 2)
    {
        printf("Usage: %s 至少要有一个选项\n", argv[0]);
        return 1;
    }

    if(strcmp("-a", argv[1]) == 0)
    {
        printf("这个是功能一\n");
    }
    else if(strcmp("-b", argv[1]) == 0)
    {
        printf("这个是功能二\n");
    }


    //printf("begin .........................\n");
    //printf("%s\n", getenv("hello"));
    //printf("pid: %d, ppid: %d\n", getpid(), getppid());
    //
    ////int i;
    ////for(i = 0; env[i]; i++)
    ////{
    ////    printf("env[%d]:%s\n", i, env[i]);
    ////}
    ////extern char **environ;
    ////for(i = 0; environ[i]; i++)
    ////{
    ////    printf("env[%d]:%s\n", i, environ[i]);
    ////}
    //printf("end ...........................\n");

    return 0;
}
